Skip to content

evolog: change evolution viewer + migrate annotate to jj_lib#25

Merged
hewigovens merged 1 commit intomainfrom
feat/evolog-viewer
Apr 29, 2026
Merged

evolog: change evolution viewer + migrate annotate to jj_lib#25
hewigovens merged 1 commit intomainfrom
feat/evolog-viewer

Conversation

@hewigovens
Copy link
Copy Markdown
Owner

Summary

  • Right-click any change in the DAG → Show evolution… opens a list of every prior rewrite for that change (snapshot/describe/rebase/squash/split/new) with operation labels and timestamps. Click a row to interdiff that version against the current head; click a file for the diff. Right-click a row for Copy Commit ID or Copy 'jj restore' command (recovery flow). Hidden on immutable changes since their evolog is a single entry.
  • evolog and file annotate now run in-process via jj_lib::evolution::walk_predecessors and jj_lib::annotate::FileAnnotator — no more jj CLI shell-out, no template parsing.
  • file_history switches to a type-safe revset (RevsetExpression::filter + FilesetExpression::file_path) instead of formatted strings; new log_typed shares iteration logic with log via a collect_changes helper.
  • New DetailPaneMode enum collapses five mutually-exclusive @State vars (annotate, file history, diff edit) into one type-safe state.
  • Command palette accepts jj as an alias for ! (e.g. jj st).
  • Annotate / FileHistory / Evolog headers now share a system Done button with esc shortcut for a consistent close affordance; evolog list uses .plain instead of .sidebar to fix the light-mode background.

Test plan

  • Open a repo, right-click a mutable change → Show evolution… shows entries with operation labels.
  • Click an evolog row → file list populates AND the first file's diff renders without needing to toggle.
  • Right-click an evolog row → Copy 'jj restore' command puts a runnable command on the clipboard.
  • Right-click an immutable change (e.g. main) → no Show evolution… entry.
  • Press esc from any of Annotate / File History / Evolog → returns to the file/diff pane.
  • Command palette: jj st, jj log, ! st all work and produce inline output.
  • Light mode: evolog left-list and file-list backgrounds match the rest of the detail pane.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a change evolution viewer (jj evolog) and GitHub Pull Request integration, while refactoring file annotation and history to use jj_lib in-process for improved performance. The UI has been updated with a new DetailPaneMode enum to manage mutually exclusive detail views and a dedicated evolution history interface. Feedback focuses on optimizing hex encoding by using byte slices to avoid unnecessary allocations and ensuring that author emails are not aggressively truncated in the data layer.

Comment thread crates/jayjay-core/src/repo/annotate.rs Outdated
Comment thread crates/jayjay-core/src/repo/annotate.rs Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7dbb55911

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread shell/mac/Sources/JayJay/Detail/FileColumn+Actions.swift
- Right-click any change → Show evolution… opens a list of every prior
  rewrite (snapshot/describe/rebase/squash/split/new) with operation
  labels and timestamps.
- Click an entry to interdiff that version against the current head;
  click a file for the side-by-side diff. Right-click a row to copy the
  commit-id or a ready-to-paste 'jj restore --from X --into @' command.
- Hidden on immutable changes since their evolog is a single entry.
- DetailPaneMode enum collapses the previous five mutually-exclusive
  @State vars (annotateLines/path, fileHistory/path, isDiffEditMode)
  into one type-safe state.
- Evolog and annotate now run in-process via jj_lib::evolution and
  jj_lib::annotate (no jj CLI shell-out, no template parsing).
- file_history switches to a typed revset built from
  RevsetExpression::filter + FilesetExpression::file_path; new log_typed
  shares iteration logic with log via collect_changes helper.
- Command palette accepts 'jj ' as an alias for '!' so 'jj st' works.
- Annotate / FileHistory / Evolog headers all use a system Done button
  with esc keyboard shortcut for a consistent close affordance; evolog
  list switches from .sidebar to .plain to fix light-mode background.
@hewigovens hewigovens merged commit b0d6da3 into main Apr 29, 2026
2 checks passed
@hewigovens hewigovens deleted the feat/evolog-viewer branch April 29, 2026 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant